
# include "Socket.h"

# include <cstring>
# include <iostream>

# define PORT 4224
# define BUF_SIZE 42

void client()
{
    char buffer[BUF_SIZE];
    Socket client;
    bool loop(true);

    client.open(AF_INET, SOCK_STREAM);
    client.connect(PORT, "127.0.0.1");

    std::cout << "CLIENT start" << std::endl;
    while (loop)
    {
        memset(buffer, '0', BUF_SIZE);
	std::cout << ">> ";
        std::cin >> buffer;
        client.send(buffer, BUF_SIZE);
	/*
        client.recv(buffer, BUF_SIZE);
        std::cout << "recv : " << buffer << std::endl;
	*/
    }
    client.close();
}
